package com.contractpage.ec.entity;
import java.util.List;

import com.contractpage.common.persistence.DataEntity;
import com.richgo.thrsys.entity.contract.TgetReserveMsgByProjectNameVO;


/**
 * 
 * null
 * 
 **/
@SuppressWarnings("serial")
public class ContractInbound extends DataEntity<ContractInbound> {

	private String projectcode;
	private String projectname;
	private Integer total;									//入库总数
	private Integer need;									//总需配送数
	private Integer dispatchnumber;							//配送数
	private Integer cancel;									//取消数
	private Integer filein;									//入档数
	private Integer returns;								//回寄数
	private String type;
	private String department;
	private String departmentname;
	private String contractpagecode;
	private String remark;
	private String[] prints;
	private Integer[] numbers;
	private String printer;
	private ExpressInbound expressInbound;
	private Integer disContract;								//可分发合同数
	private Integer appointeds;									//已分发预约数
	private Integer needAppoints;								//待分发预约数
	private List<TgetReserveMsgByProjectNameVO> appoints; 		//预约信息(多金)
	private List<Appoint> apps; 								//预约信息(本系统)
	/**
	 * 获取可配送数
	 * @return
	 */
	public Integer getCanDispatchnumber(){
		if(total == null||dispatchnumber == null){
			return 0;
		}
		dispatchnumber = dispatchnumber == null?0:dispatchnumber;
		return total - dispatchnumber;
	}
	
	/**
	 * 获取需要配送数
	 * @return
	 */
	public Integer getNd(){
		if(need == null){
			return 0;
		}
		dispatchnumber = dispatchnumber == null?0:dispatchnumber;
		return need - dispatchnumber;
	}

	/**
	 * 获取可调配数
	 * @return
	 */
	public Integer getdeNd(){
		Integer nd = getNd();
		if(nd > 0) return 0;
		return Math.abs(nd);
	}
	
	public List<TgetReserveMsgByProjectNameVO> getAppoints() {
		return appoints;
	}

	public void setAppoints(List<TgetReserveMsgByProjectNameVO> appoints) {
		this.appoints = appoints;
	}

	public List<Appoint> getApps() {
		return apps;
	}

	public void setApps(List<Appoint> apps) {
		this.apps = apps;
	}

	public Integer getNeed() {
		need = need == null?0:need;
		return need;
	}
	public void setNeed(Integer need) {
		this.need = need;
	}
	public Integer getDisContract() {
		disContract = disContract == null?0:disContract;
		return disContract;
	}
	public void setDisContract(Integer disContract) {
		this.disContract = disContract;
	}
	public Integer getAppointeds() {
		appointeds = appointeds == null?0:appointeds;
		return appointeds;
	}
	public void setAppointeds(Integer appointeds) {
		this.appointeds = appointeds;
	}
	public Integer getNeedAppoints() {
		needAppoints = needAppoints == null?0:needAppoints;
		return needAppoints;
	}
	public void setNeedAppoints(Integer needAppoints) {
		this.needAppoints = needAppoints;
	}
	/*public List<TgetReserveMsgByProjectNameVO> getAppoints() {
		return appoints;
	}
	public void setAppoints(List<TgetReserveMsgByProjectNameVO> appoints) {
		this.appoints = appoints;
	}*/
	public ExpressInbound getExpressInbound() {
		return expressInbound;
	}
	public void setExpressInbound(ExpressInbound expressInbound) {
		this.expressInbound = expressInbound;
	}
	public String getPrinter() {
		return printer;
	}
	public void setPrinter(String printer) {
		this.printer = printer;
	}

	public String[] getPrints() {
		return prints;
	}

	public void setPrints(String[] prints) {
		this.prints = prints;
	}

	public Integer[] getNumbers() {
		return numbers;
	}

	public void setNumbers(Integer[] numbers) {
		this.numbers = numbers;
	}

	public void setProjectcode(String projectcode){
		System.out.println();
		this.projectcode = projectcode;
	}

	public String getProjectcode(){
		return this.projectcode;
	}

	public void setProjectname(String projectname){
		this.projectname = projectname;
	}

	public String getProjectname(){
		return this.projectname;
	}

	public void setTotal(Integer total){
		this.total = total;
	}

	public Integer getTotal(){
		total = total == null?0:total;
		return this.total;
	}

	public void setDispatchnumber(Integer dispatchnumber){
		this.dispatchnumber = dispatchnumber;
	}

	public Integer getDispatchnumber(){
		return dispatchnumber == null?0:dispatchnumber;
	}

	public void setCancel(Integer cancel){
		this.cancel = cancel;
	}

	public Integer getCancel(){
		return cancel == null?0:cancel;
	}

	public void setFilein(Integer filein){
		this.filein = filein;
	}

	public Integer getFilein(){
		return filein == null?0:filein;
	}

	public void setReturns(Integer returns){
		this.returns = returns;
	}

	public Integer getReturns(){
		return returns == null?0:returns;
	}

	public void setType(String type){
		this.type = type;
	}

	public String getType(){
		return this.type;
	}

	public void setDepartment(String department){
		this.department = department;
	}

	public String getDepartment(){
		return this.department;
	}

	public void setContractpagecode(String contractpagecode){
		this.contractpagecode = contractpagecode;
	}

	public String getContractpagecode(){
		return this.contractpagecode;
	}

	public void setRemark(String remark){
		this.remark = remark;
	}

	public String getRemark(){
		return this.remark;
	}

	public String getDepartmentname() {
		return departmentname;
	}

	public void setDepartmentname(String departmentname) {
		this.departmentname = departmentname;
	}
	

}
